using System;
using Sissonix.Infrastructure.DomainBase;
using System.Collections.Generic;

namespace Sissonix.Infrastructure.RepositoryFramework
{
    public interface IRepository<T> where T : IAggregateRoot
    {
        IUnitOfWork UnitOfWork { get; set; }
        T FindBy(object key);
        int Count();
        IList<T> FindAll();
        IList<T> FindAll(int? start, int? limit, string sortField, string sortDirection);
        void Add(T item);
        void Remove(T item);
        void Remove(long id);
        void Change(T item);
        T this[object key] { get; set; }
    }
}
